function e(e, n) {
    return new Promise(function(t, i) {
        o.default["site" === e ? "site" : "minicard"].agent.getcompanyinfo({
            data: {
                agentid: n,
                from: "site"
            },
            desc: "获取代理商信息"
        }).then(function(e) {
            t(e);
        });
    });
}

function n(e, n, t) {
    var o = "site" === e ? "小官网" : "小名片";
    wx.showModal({
        title: "操作提示",
        content: "该官网由" + o + "服务商“" + n + "”提供服务，请联系该服务商进行续费升级操作。",
        confirmText: "立即联系",
        cancelText: "我知道了",
        success: function(e) {
            e.confirm && wx.makePhoneCall({
                phoneNumber: t
            });
        }
    });
}

function t() {
    wx.showModal({
        title: "升级提示",
        content: "企业微信内暂不支持升级续费官网",
        confirmText: "我知道了",
        showCancel: !1
    });
}

Object.defineProperty(exports, "__esModule", {
    value: !0
}), exports.updateVersion = function(o) {
    var i = o.sid, a = o.agentid, r = o.agentapp, c = o.agentmobile, s = getApp().globalData.environment;
    "site" === r ? 2 == +a ? "wxwork" === s ? t() : wx.navigateTo({
        url: "/pages/site-create/renew/renew?sid=" + i
    }) : e(r, a).then(function(e) {
        var t = e.corpname;
        n(r, t, c);
    }) : e(r, a).then(function(e) {
        var t = e.corpname;
        n(r, t, c);
    });
};

var o = function(e) {
    return e && e.__esModule ? e : {
        default: e
    };
}(require("./api2"));